const common = require('./common');

const url = {
  getCheckConfig: "/zgb/v1/mobileAttendance/getProjectAttendanceConfigList", //获取考勤区域配置
  checkIn: "/zgb/v1/mobileAttendance/record", //打卡
  checkInV2: "/zgb/v2/mobileAttendance/record", //打卡V2版
  addProjectAttendanceConfig: "/zgb/v2/mobileAttendance/addProjectAttendanceConfig", //新增项目考勤配置
  modifyProjectAttendanceConfig: "/zgb/v2/mobileAttendance/modifyProjectAttendanceConfig", //修改项目考勤配置
  deleteProjectAttendanceConfig: "/zgb/v2/mobileAttendance/deleteProjectAttendanceConfig", //删除项目考勤配置

}

const getCheckConfig = (data) => {
  return common.req(url.getCheckConfig, data, 'get');
}
const checkIn = (data) => {
  return common.req(url.checkIn, data);
}
const checkInV2 = (data) => {
  return common.req(url.checkInV2, data);
}
const addProjectAttendanceConfig = (data) => {
  return common.req(url.addProjectAttendanceConfig, data);
}
const modifyProjectAttendanceConfig = (data) => {
  return common.req(url.modifyProjectAttendanceConfig, data);
}
const deleteProjectAttendanceConfig = (data) => {
  return common.req(url.deleteProjectAttendanceConfig, data, 'get');
}


export default {
  getCheckConfig,
  checkIn,
  checkInV2,
  addProjectAttendanceConfig,
  modifyProjectAttendanceConfig,
  deleteProjectAttendanceConfig
}